package org.duiduo.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.duiduo.service.UserService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 用户控制层
 *
 * @author liangze
 * @date 2024/9/9 14:25
 */
@RestController
public class UserController {

    @DubboReference
    private UserService userService;

    /**
     * 登录
     *
     * @return boolean 是否成功
     */
    @GetMapping("/login")
    public boolean login() {
        boolean ret = userService.login("测试", "123456");
        System.out.println("ret = " + ret);
        return ret;
    }

}
